package com.yingxin.yx.framework.commons.enums;

/**
 * 动态任务-地址设置-类型
 */

public enum DynamicTaskSetTypeEnums {

    TASK_URL("TASK_URL", "任务地址"),
    ;

    private String type;

    private String typeName;

    DynamicTaskSetTypeEnums(String type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public static DynamicTaskSetTypeEnums getEnum(String type) {
        if (type == null) {
            return null;
        }
        for (DynamicTaskSetTypeEnums i : DynamicTaskSetTypeEnums.values()) {
            if (i.getType().equals(type)) {
                return i;
            }
        }
        return null;
    }

}
